package cn.monkey.transport.mq.rabbitmq;

import cn.monkey.transport.mq.rabbitmq.codec.Codec;
import com.rabbitmq.client.Address;
import reactor.rabbitmq.ConsumeOptions;
import reactor.rabbitmq.SendOptions;

public class RabbitMqTransportConfig {

    private Inbound inbound;

    private Outbound outbound;

    public Inbound getInbound() {
        return inbound;
    }

    public void setInbound(Inbound inbound) {
        this.inbound = inbound;
    }

    public Outbound getOutbound() {
        return outbound;
    }

    public void setOutbound(Outbound outbound) {
        this.outbound = outbound;
    }

    public static class Inbound {
        private String queue;
        private Address[] addresses;
        private Codec codec;
        private boolean autoAck;

        private ConsumeOptions consumeOptions;

        public String getQueue() {
            return queue;
        }

        public void setQueue(String queue) {
            this.queue = queue;
        }

        public Address[] getAddresses() {
            return addresses;
        }

        public void setAddresses(Address[] addresses) {
            this.addresses = addresses;
        }

        public boolean isAutoAck() {
            return autoAck;
        }

        public void setAutoAck(boolean autoAck) {
            this.autoAck = autoAck;
        }

        public Codec getCodec() {
            return codec;
        }

        public void setCodec(Codec codec) {
            this.codec = codec;
        }

        public ConsumeOptions getConsumeOptions() {
            return consumeOptions;
        }

        public void setConsumeOptions(ConsumeOptions consumeOptions) {
            this.consumeOptions = consumeOptions;
        }
    }

    public static class Outbound {
        private Address[] addresses;

        private Codec codec;
        private String exchange;
        private String routerKey;
        private SendOptions sendOptions;
        private int cacheSize;

        public Address[] getAddresses() {
            return addresses;
        }

        public void setAddresses(Address[] addresses) {
            this.addresses = addresses;
        }

        public Codec getCodec() {
            return codec;
        }

        public void setCodec(Codec codec) {
            this.codec = codec;
        }

        public String getExchange() {
            return exchange;
        }

        public void setExchange(String exchange) {
            this.exchange = exchange;
        }

        public String getRouterKey() {
            return routerKey;
        }

        public void setRouterKey(String routerKey) {
            this.routerKey = routerKey;
        }

        public SendOptions getSendOptions() {
            return sendOptions;
        }

        public void setSendOptions(SendOptions sendOptions) {
            this.sendOptions = sendOptions;
        }

        public int getCacheSize() {
            return cacheSize;
        }

        public void setCacheSize(int cacheSize) {
            this.cacheSize = cacheSize;
        }
    }
}
